/*
 * @Author: duchengdong
 * @Date: 2021-10-27 10:28:45
 * @LastEditors: duchengdong
 * @LastEditTime: 2021-12-28 21:20:40
 * @Description: 路由配置文件
 */
import AuthLayout from 'layout/AuthLayout'
import { lazy } from 'react'

const RouteConfig = [
    {
        path: "/login",
        component: lazy(() => import("../pages/Login")),
    },
    {
        path: "/",
        component: AuthLayout,
        children: [
            {
                path: "/page1",
                component: lazy(() => import("../pages/Home")),
            },
            {
                path: "/list",
                component: lazy(() => import("../pages/BookList")),
            },
            {
                path: "/edit/:id?",
                component: lazy(() => import("../pages/AddBook")),
            },
            { path: "/", redirect: "/page1" },
        ],
    },
];

export const initRouteConfig = [
    {
        path: '/login',
        component: lazy(() => import('pages/Login')),
    },
]

export default RouteConfig
